{% extends "template/listEdit.volt" %}

{% block title %}LiDAR列表{% endblock %}

{% block filter %}
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>LiDAR设备编号:</th>
                <td><input type="text" name="lidar_id" value=""></td>
            </tr>
            <tr>
                <th>创建时间:</th>
                <td><input type="date-h" name="created_at_start" data-attr="date" value="">
                    -<input type="date-h" name="created_at_end" data-attr="date right" class="end" value=""></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>激光扫描仪类型:</th>
                <td>
                    <select name="laserScannerType_id">
                        <option value="">请选择</option>
                        {% for id,name in laserScannerList %}
                            <option value="{{ id }}">{{ name }}</option>
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <th>激光扫描仪设备ID:</th>
                <td><input type="text" name="laser_scanner_id" value=""></td>
            </tr>
        </table>
    </div>
    <div class="col-md-4 col-sm-6 col-xs-12">
        <table>
            <tr>
                <th>IMU类型:</th>
                <td>
                    <select name="IMUType_id">
                        <option value="">请选择</option>
                        {% for id,name in IMUTypeList %}
                            <option value="{{ id }}">{{ name }}</option>
                        {% endfor %}
                    </select>
                </td>
            </tr>
            <tr>
                <th>IMU设备ID:</th>
                <td><input type="text" name="imu_type_id" value=""></td>
            </tr>
            <tr>
                <td colspan="2">
                    <div id="btn_reset_param" class="btn-0 button">重 置</div>
                    <div id="btn_search_data" class="btn-1 button">过 滤</div>
                </td>
            </tr>
        </table>
    </div>
{% endblock %}
{% block hiddenCheckAll %}hidden{% endblock %}
{% block hiddenDeleteAll %}hidden{% endblock %}

{% block jscontent %}
    <script>
        $(function () {
            PageDataProxy.init({
                "action_detail_url": "/lidar/editLiDAR",
                "action_delete_url": "/lidar/editLiDAR",
                "action_add_url": "/setting/addJob",
                "url": "/lidar/listLiDAR",
                "table_id": "#mytable",
                "page_control_id": "#data-wrap",
                "page_size_id": "#rows-perpage-select",
                "page_total_id": "#data_count_total",
                "use_check_box": false,
                "data_field_process": function (name, value) {
                    if (name == "check_result_url") {
                        if(value){
                            return "<a href='" + value + "' download=''>文件下载</a>";
                        }
                    }
                    if (name == "check_project_url") {
                        if(value){
                            return "<a href='" + value + "' download=''>文件下载</a>";
                        }
                    }
                    return value;
                },
                "table_style": {
                    "id": "width-50",
                    "lidar_id": "width-150",
                    "laser_name": "width-150",
                    "laser_scanner_id": "width-150",
                    "imu_name": "width-150",
                    "imu_type_id": "width-200",
                    "check_result_url": "width-100",
                    "check_project_url": "width-100",
                    "nickname": "width-100",
                    "checked_at": "width-150"
                },
                "operation_style": "width: 230px; min-width: 230px;",
                "data_field_action_process": function (tag) {
                    return "<td onclick=PageDataProxy.actionDetail('id=" + tag + "')><img class='action-show-icon'>编辑</td>" +
                            "<td onclick=\"window.open('/firmware/firmwareDetail?id=" + tag + "')\"><img class='action-show-icon'>查看</td>";
                        //"<td onclick=PageDataProxy.actionDelete('id'," + tag + ")><img class='action-del-icon'>删除</td>";
                }
            });
        })
    </script>
{% endblock %}